<?php
class ArticleControl extends CommonControl {
	public function index(){
		$article=new ArticleModel();
		$artData=$article->selart();
		require($this->view->tpl_dir.'/article.php');
	}
	public function add(){
		$artcate=new Article_cateModel();
		$artcateData=$artcate->fetchAll();
		require($this->view->tpl_dir.'/add.php');
	}
	
	public function addck(){
		$artcate=new ArticleModel();
		$_POST['atime']=time();
		$num=$artcate->insert($_POST);
		if($num==1){
			$this->success('/index.php/Admin/Article/index');
		}else{
			$this->error('/index.php/Admin/Article/index');
		}
	}
}
?>